import React from 'react';
import appSelector from '../selectors/appSelector';
import { connect } from 'react-redux';
import { shouldComponentUpdate } from 'react-immutable-render-mixin';
import Header from '../components/header';
import Footer from '../components/footer';
class App extends React.Component {
    constructor(props) {
        super(props);
        this.shouldComponentUpdate = shouldComponentUpdate.bind(this);
    }
    render() {
        return (
            <div>
                <Header {...this.props}/>
                <div>
                    {this.props.children}
                </div>
                <Footer/>
            </div>
        )
    }
}
/***参数校验*/
App.propTypes = {
    isLogin: React.PropTypes.bool.isRequired
}

/**主装state的属性到App的属性数据*/
export default connect(appSelector)(App);